package per.sen.shopping.infrastructure.common.response;


/**
 * @Describe: 统一响应状态码
 * @Author: LYS
 * @DateTime: 2023/11/26 18:58
 */
public enum HttpStatus {
    SUCCESS(200,"操作成功"),
    BAD_REQUEST(400,"业务异常"),
    UNAUTHORIZED(401,"未授权"),
    FORBIDDEN(403,"禁止访问"),
    NOT_FOUND(404,"路径不存在,请检查路径是否正确"),
    METHOD_NOT_ALLOWED(405,"请求方法不允许,请检查请求方法是否正确"),
    REQUEST_TIMEOUT(408,"请求超时"),
    CONFLICT(409,"资源冲突"),
    GONE(410,"资源已过期"),
    UNSUPPORTED_MEDIA_TYPE(415,"不支持的媒体类型"),
    TOO_MANY_REQUESTS(429,"请求过多"),
    INTERNAL_SERVER_ERROR(500,"服务器内部错误");
   

    private final Integer code;
    private final String msg;


    HttpStatus(Integer code, String msg) {
        this.code = code;
        this.msg = msg;

    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }



}
